#include "iostream"
#include "stdlib.h"
 
#include "cv.h"
#include "highgui.h"
using namespace std;
int main(){
    IplImage * resim;
    IplImage* gri = cvCreateImage(cvSize(92,112), IPL_DEPTH_8U, 1);
    IplImage* boyut = cvCreateImage(cvSize(92,112), IPL_DEPTH_8U, 3);
    char res[512];
    cout << "dosya ismi: ";
    cin >> res;
    resim= cvLoadImage(res,1);
    cvResize(resim,boyut,CV_INTER_LINEAR);
    cvCvtColor(boyut,gri,CV_BGR2GRAY);
    cvEqualizeHist( gri, gri );
    cvSaveImage("gri.jpg",gri);  
    cvReleaseImage(&gri);
    cvReleaseImage(&boyut);
    cvReleaseImage(&resim);
    
#ifdef win32
    system("pause");
#endif
    return 0;
    }
